<!-- 会员中心 -->
<template>
    <div>
        <div :class="[memberWarp, isShow ? '': 'open']">
    会员中心
  </div>
    </div>

</template>

<script>
export default {
  data () {
    return {
        memberWarp: 'member-warp',
        isShow: false
    };
  },

  components: {},


  watch:{
    '$route.name': {
      deep: true,
      immediate: true,
      handler(val){
        if(val === 'map') this.$store.commit('amap/SHOW',false)
        else if(val === 'member') this.$store.commit('amap/SHOW',true)
        console.log('会员中心-路由name=', val);
        this.isShow = this.$store.state.amap.showMember
      }
    }

  },
  computed: {},

  created(){
    // this.isShow = this.$store.state.amap.showMember
  },
  methods: {

  }
}

</script>
<style lang='less' scoped>
.member-warp{
    background: rgb(108, 108, 165);
    position: fixed;
    width: 300px;
    height: 100%;
    z-index: 104;
    right: 0;
    top:0;
    transition: all .3s ease 0s;
    -webkit-transition: all .3s ease 0s;
    -ms-transition: all .3s ease 0s;
    -moz-transition: all .3s ease 0s;
    -o-transition: all .3s ease 0s;

    &.open{
      display:none
    }
}
</style>